package br.com.cs.pojo;

import br.com.cs.exception.CSException;


public class BasePojoFactory {
    
    private static PojoFactory pojoFactory;

    public static PojoFactory getPojoFactory() throws CSException {
        if (pojoFactory != null){
            return pojoFactory;
        } else{
            throw new CSException("PojoFactory não foi inicializada!");
        }
    }

    public static synchronized void setPojoFactory(PojoFactory pojoFactory) {
        BasePojoFactory.pojoFactory = pojoFactory;
    }

}
